-- GENERATED SPELL FOR [Coldmine Invader] --


function spell0_13087(pUnit, Event) --@Hamstring,n/a--
pUnit:FullCastSpellOnTarget(9080,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_13087', 10250, 1)
end

function spell1_13087(pUnit, Event) --@Rend,n/a--
pUnit:FullCastSpellOnTarget(16509,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_13087', 15000, 1)
end

function spell2_13087(pUnit, Event) --@Strike,n/a--
pUnit:FullCastSpellOnTarget(12057,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_13087', 578, 1)
end

function Sorts_13087(pUnit, Event)
local choix_sorts_13087 = math.random(0, 2)
if choix_sorts_13087 == 0 then
pUnit:RegisterEvent('spell0_13087', 1, 1)
end
if choix_sorts_13087 == 1 then
pUnit:RegisterEvent('spell1_13087', 1, 1)
end
if choix_sorts_13087 == 2 then
pUnit:RegisterEvent('spell2_13087', 1, 1)
end
end

function mob13087_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_13087', math.random(1500, 3000), 1)
end

function mob13087_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob13087_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob13087_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(13087, 1, 'mob13087_Action')
RegisterUnitEvent(13087, 2, 'mob13087_Leave')
RegisterUnitEvent(13087, 3, 'mob13087_Kill')
RegisterUnitEvent(13087, 4, 'mob13087_Die')
